﻿<script type="text/javascript">
        $(document).ready(function () {

            var text = "Geef usernaam...";

            $("#searchbar_menu").focus(function () {
                $(this).addClass("active");
                if ($(this).attr("value") == text) $(this).attr("value", "");
            });

            $("#searchbar_menu").blur(function () {
                $(this).removeClass("active");
                if ($(this).attr("value") == "") $(this).attr("value", text);
            });
        });
    
</script>


 <br /><br />
<ul id="nav" class="dropdown dropdown-horizontal">

@if ((bool)Session["isAdmin"])
{
    <li class="dir">Admin
        <ul>
            <li><a href="@Url.Action("Index", "Admin")">Links</a></li>
        </ul>
    </li>
}

@if ((bool)Session["isHelpdesk"] || (bool)Session["isAdmin"])
{
    <li class="dir">Log
                <ul>
                    @{ var log_list = ViVa.ActiveDirectory.DataFiller<ViVa.ActiveDirectory.Logging>.FromDataTableToList(ViVa.ActiveDirectory.Logging.getLogTypes()); ;}
                    @foreach (ViVa.ActiveDirectory.Logging log in log_list)
                    {
                        <li>
                            @Html.ActionLink(log.Type_log, "showLog", "Log", log, null)
                        </li>
                    }
                </ul>
    </li>
}

@if ((bool)Session["isHelpdesk"] || (bool)Session["isAdmin"])
{
    <li class="dir">Service Desk
        <ul>
            <li>
            @{
                using (Html.BeginForm("ZoekADUser", "ADUser"))
                {
                    @Html.TextBox("searchbar_menu", "Geef usernaam...", new { @autocomplete = "off", @class="searchbar"}) <button id="searchbtn" type="submit" > Zoek user... </button> 
                }
            }<br /><br />
            </li>
            <li><a href="@Url.Action("ZoekADUser", "ADUser")">Uitgebreid zoeken</a></li>
        </ul>
    </li>
}

@if (!(bool)Session["isGuest"])
{
    <li class="dir" style="background:#EB2159;"><a href="@Url.Action("SelfService", "Home")" style="color:White;">Home</a></li>
}

</ul>